package org.debezium.utils;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class CommonUtil {
    public Properties loadProperties(String pathName) {
        Properties properties = new Properties();
        try {
            properties.load(this.getClass().getClassLoader().getResourceAsStream(pathName));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties;
    }

    public static void main(String[] args) {
        CommonUtil commonUtil = new CommonUtil();
        Properties properties = commonUtil.loadProperties("debezium-connector.properties");
        System.out.println(properties.get("name"));
    }
}
